home *** CD-ROM | disk | FTP | other *** search
/ GKGM 014 / GKGM014.iso / hentai / sex_kitten_sim_rpg.swf / scripts / DefineSprite_464 / frame_12 / PlaceObject2_245_1060 / CLIPACTIONRECORD onClipEvent(enterFrame).as
Text File  |  2005-09-06  |  3KB  |  121 lines

  1. onClipEvent(enterFrame){
  2.    with(_root.hero)
  3.    {
  4.       if(Key.isDown(40) && !Key.isDown(37) && !Key.isDown(39))
  5.       {
  6.          if(_root.hero_face <= 8 || _root.hero_face > 12)
  7.          {
  8.             _root.hero_face = 9;
  9.          }
  10.          _root.hero_face += 1;
  11.          if(_root.hero_face == 13)
  12.          {
  13.             _root.hero_face = 9;
  14.          }
  15.          _root.hero_y += 8;
  16.       }
  17.       if(Key.isDown(38) && !Key.isDown(37) && !Key.isDown(39))
  18.       {
  19.          if(_root.hero_face > 4)
  20.          {
  21.             _root.hero_face = 1;
  22.          }
  23.          _root.hero_face += 1;
  24.          if(_root.hero_face == 5)
  25.          {
  26.             _root.hero_face = 1;
  27.          }
  28.          _root.hero_y -= 8;
  29.       }
  30.       if(Key.isDown(37) && !Key.isDown(40) && !Key.isDown(38))
  31.       {
  32.          if(_root.hero_face <= 12)
  33.          {
  34.             _root.hero_face = 13;
  35.          }
  36.          _root.hero_face += 1;
  37.          if(_root.hero_face == 17)
  38.          {
  39.             _root.hero_face = 13;
  40.          }
  41.          _root.hero_x -= 8;
  42.       }
  43.       if(Key.isDown(39) && !Key.isDown(40) && !Key.isDown(38))
  44.       {
  45.          if(_root.hero_face <= 4 || _root.hero_face > 8)
  46.          {
  47.             _root.hero_face = 5;
  48.          }
  49.          _root.hero_face += 1;
  50.          if(_root.hero_face == 9)
  51.          {
  52.             _root.hero_face = 5;
  53.          }
  54.          _root.hero_x += 8;
  55.       }
  56.       if(wall.hitTest(getBounds(_root).xMax,_y,true))
  57.       {
  58.          _root.hero_x -= 8;
  59.       }
  60.       if(wall.hitTest(getBounds(_root).xMin,_y,true))
  61.       {
  62.          _root.hero_x += 8;
  63.       }
  64.       if(wall.hitTest(_x,getBounds(_root).yMax,true))
  65.       {
  66.          _root.hero_y -= 8;
  67.       }
  68.       if(wall.hitTest(_x,getBounds(_root).yMin,true))
  69.       {
  70.          _root.hero_y += 8;
  71.       }
  72.       if(_root.front.door.hitTest(_x,getBounds(_root).yMin,true))
  73.       {
  74.          _root.hero_x_temp = _root.hero_x;
  75.          _root.hero_y_temp = _root.hero_y;
  76.          _root.hero_y = 426;
  77.          _root.hero_x = 224;
  78.          _root.loc += _root.house_level;
  79.       }
  80.       if(_root.front.person.hitTest(getBounds(_root).xMax,_y,true) || _root.front.person.hitTest(getBounds(_root).xMin,_y,true) || _root.front.person.hitTest(_x,getBounds(_root).yMax,true) || _root.front.person.hitTest(_x,getBounds(_root).yMin,true))
  81.       {
  82.          _root.help.gotoAndStop(2);
  83.          if(Key.isDown(32))
  84.          {
  85.             _root.house_loc = x;
  86.             _root.play();
  87.          }
  88.       }
  89.       else
  90.       {
  91.          _root.help.gotoAndStop(1);
  92.       }
  93.       if(_root.back.item.hitTest(getBounds(_root).xMax,_y,true) || _root.back.item.hitTest(getBounds(_root).xMin,_y,true) || _root.back.item.hitTest(_x,getBounds(_root).yMax,true) || _root.back.item.hitTest(_x,getBounds(_root).yMin,true))
  94.       {
  95.          _root.key[3] = 1;
  96.          _root.house_loc = 39;
  97.          _root.play();
  98.       }
  99.       if(_root.hero_x >= 480)
  100.       {
  101.          _root.loc += 1;
  102.          _root.hero_x = 48;
  103.       }
  104.       if(_root.hero_x <= 0)
  105.       {
  106.          _root.loc -= 1;
  107.          _root.hero_x = 456;
  108.       }
  109.       if(_root.hero_y >= 480)
  110.       {
  111.          _root.loc += _root.sq_level;
  112.          _root.hero_y = 48;
  113.       }
  114.       if(_root.hero_y <= 0)
  115.       {
  116.          _root.loc -= _root.sq_level;
  117.          _root.hero_y = 456;
  118.       }
  119.    }
  120. }
  121.